#ifndef KEYDISPATCHER_H
#define KEYDISPATCHER_H


#include "signal.h"


struct epoll_event;


class KeyDispatcher 
{
public:
    KeyDispatcher();
    ~KeyDispatcher();

    bool init();
    void run();

    Signal<void (*)(int, int, int)> m_key;

private:
    int m_epfd;
    int m_kdfd;
    int m_msfd;

    void doInput(const epoll_event* ev);

};


#endif // KEYDISPATCHER_H